import 'package:flutter/material.dart';
import 'package:flutterroom/pages/home/tab_search/dataList.dart';
import 'package:flutterroom/pages/home/tab_search/searchWidget/Right_drawer.dart';
import 'package:flutterroom/pages/home/tab_search/searchWidget/filter_bar_widget.dart';
import 'package:flutterroom/widgets/room_list_widget.dart';
import 'package:flutterroom/widgets/search_index/search_bar.dart';

class SearchIndexPage extends StatefulWidget {
  @override
  _SearchIndexPageState createState() => _SearchIndexPageState();
}

class _SearchIndexPageState extends State<SearchIndexPage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      endDrawer: RightDrawer(),
      appBar: AppBar(
        elevation: 0,
        actions: <Widget>[Container()],
        brightness: Brightness.light,
        title:  SearcgBar(
        showLoaction: true,
        showMap: true,
        onSearch: (){
          Navigator.of(context).pushNamed("search");
        },
      ),backgroundColor: Colors.white,
      ),
      body: Column(
        children: <Widget>[
          Container(
            child: SearchTitleBtn(onChange:(dataList){

            }),
            height: 41,
          ),
          Expanded(
              child: ListView(
            children: dataList
                .map((item) => RoomListItemWidget(item))
                .toList(),
          ))
        ],
      ),
    );
  }
}
